﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudentGuideAdd.aspx.cs" Inherits="DBA.Web.StudentManage.StudentGuideAdd" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqJqueryManager" TagPrefix="cc1" %>

<%@ Register Assembly="SqControls" Namespace="SqControls.SqVerification" TagPrefix="cc2" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="../../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
    <script src="../../Scripts/Public.js" type="text/javascript"></script>
    <script src="/Scripts/date/WdatePicker.js" type="text/javascript"></script>
    <link href="../../Styles/CommonEdit.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
        var DG = frameElement.lhgDG;
        $(function () {
            DG.addBtn('obtn', '提 交', function () {
                if (validateControlsById("tbEdit")) {
                    parent.alertMsg.confirm("是否确认执行保存?", {
                        okCall: function () {
                            Public.CallBack("lnkSave", "");
                        }
                    });
                }
            });
            $("#aClearTeachers").live("click", function () {
                $("#aSelectTeachers").text("点击选取教师");
                $("#aClearTeachers").css("display", "none");
                $("#txt_EmployeeID").val("");
            });
            $("#aSelectTeachers").live("click", function () {
                Public.ShowWindow('选择教师', "../PublicControl/SelectTeachers.aspx", 900, 569, null, true);
            });
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, e) {
                if ($("#hdResult").val() == "1") {
                    Public.OpertAlert("操作成功!", true, "AspNetPager1");

                    //Public.GetParentWindow().Public.RefreshTable('spiltPager');
                    //DG.cannel();
                } else {
                    alert("操作失败,请重试!");
                }
            });

        });
        function CheckEmployeeID() {
            var obj = $("#txt_EmployeeID").val();
            if (obj == "") {
                alert("请先选择一位教师!");
                return false;
            } else {
                return true;
            }
        }
        function SetSelectTeacher(id, name) {
            $("#aSelectTeachers").text(name);
            $("#aClearTeachers").css("display", "");
            $("#txt_EmployeeID").val(id);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <cc1:JqueryManager ID="JqueryManager1" runat="server" SelectedVersion="None" SelectedControlScript="TextBox"
        VerificationManager="true"></cc1:JqueryManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="divTable" style="width: 600px;">
            <asp:Panel ID="pan_tab" runat="server">
                <table id="tbEdit" cellspacing="0" cellpadding="0" style="width: 100%;">
                    <tr>
                        <td class="r_left">
                            姓名：
                        </td>
                        <td>
                         <span runat="server" id="spanName">
                          <a href="#" id="aSelectTeachers" style="background-color: #a2b8ce;border: 1px solid #ccc; padding: 2px; color: White;">点击选择教师</a>
                          &nbsp;&nbsp;
                          <a href="#" id="aClearTeachers" style="display: none; color: #ff8c00"><strong>(清空选择)</strong></a>
                          
                          </span><div style="display:none;">
                          <input type="text" id="txt_EmployeeID" runat="server" /><cc2:ValidateCusFunc ID="ValidateCusFunc1"
                              runat="server" ControlID="txt_EmployeeID" CusFuncName="CheckEmployeeID"></cc2:ValidateCusFunc>
                          </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            层次：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddl_Grade" runat="server">
                                <asp:ListItem Selected="True" Value="0">本科生</asp:ListItem>
                                <asp:ListItem Value="1">普研硕士</asp:ListItem>
                                <asp:ListItem Value="2">普研博士</asp:ListItem>
                                <asp:ListItem Value="3">DBA</asp:ListItem>
                                <asp:ListItem Value="4">MBA</asp:ListItem>
                                <asp:ListItem Value="5">EMBA</asp:ListItem>
                                <asp:ListItem Value="6">工程硕士</asp:ListItem>
                                <asp:ListItem Value="7">留学生</asp:ListItem>
                            </asp:DropDownList><cc2:ValidateEmpty
                                ID="ValidateEmpty3" runat="server" ForeColor="Red" ControlID="ddl_Grade">*</cc2:ValidateEmpty>
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            年度：
                        </td>
                        <td>
                            <input class="in_sty required" readonly id="txt_Year" type="text" runat="server" style="text-align:left;" onfocus="WdatePicker({dateFmt:'yyyy'})"/><cc2:ValidateEmpty
                                ID="ValidateEmpty4" runat="server" ForeColor="Red" ControlID="txt_Year">*</cc2:ValidateEmpty>
                        </td>
                    </tr>
                    <tr>
                        <td class="r_left">
                            指导人次数：
                        </td>
                        <td>
                            <input class="in_sty required" id="txt_StudentCount" type="text" runat="server" style="text-align:left;"/><cc2:ValidateEmpty
                                ID="ValidateEmpty5" runat="server" ForeColor="Red" ControlID="txt_StudentCount">*</cc2:ValidateEmpty>
                        </td>
                    </tr>
                     <tr>
                        <td class="r_left">
                            指导明细：
                        </td>
                        <td>                           
                         <textarea id="txt_Detail" type="text" runat="server"  class="in_sty required" style="width: 416px;
                                height: 50px;text-align:left;" rows="3" cols="3"></textarea>
                        </td>
                    </tr>
                </table>
                   
              </asp:Panel>
            </div>
            <div style="display:none;">
                <asp:LinkButton ID="lnkSave" runat="server" onclick="lnkSave_Click"></asp:LinkButton><asp:HiddenField ID="hdResult" runat="server" /></div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:HiddenField ID="hidID" runat="server" />
   
    </form>
</body>
</html>
